import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import * as ElIcon from '@element-plus/icons-vue'
import zhCn from 'element-plus/es/locale/lang/zh-cn'
import { createPinia } from 'pinia'
import persist from 'pinia-plugin-persistedstate'
import '@/assets/main.css'

const app = createApp(App);
const pinia = createPinia()

pinia.use(persist)
app.use(pinia)
Object.keys(ElIcon).forEach((key) => {
    app.component(key, ElIcon[key])
})
//引入element-plus并且使用中文
app.use(ElementPlus,{locale:zhCn})
app.use(router)



app.mount('#app')
